<div class="col-sm-12">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>{$model.title}-修改规格/属性</h5>

        </div>
        <div class="ibox-content">
            <form method="post" action="update?id={$model.id}" class="form-horizontal" enctype="multipart/form-data">

                <div class="form-group">
                    <label class="col-sm-3 control-label">类别名称：</label>
                    <div class="col-sm-6">
                        <input required type="text" value="{$model.title}" name="title" class="form-control"
                               placeholder="">
                    </div>
                </div>
                {volist name="$model.val" id="val"}
                <div class="form-group" id="val{$i}">
                    <label class="col-sm-3 control-label">属性/规则：</label>
                    <div class="col-sm-6">
                        <input required type="text" value="{$val.name}" name="name[]" class="form-control"
                               placeholder="">
                    </div>
                    <div class="col-sm-3">
                        <div onclick="del('val{$i}')" class="btn btn-warning btn-sm">删除</div>
                    </div>
                </div>
                {/volist}


                <div class="form-group">
                    <div class="col-sm-4 col-sm-offset-2">
                        <button class="btn btn-primary btn-sm"  type="submit">保存修改</button>
                        <div class="btn btn-white btn-sm" onclick="javascript:window.history.go(-1)">取消</div>
                        <a class="btn btn-white btn-sm" href="/spec/index" >上一级</a>
                    </div>
                </div>
            </form>
            <div id="js-openModal1" style="position: absolute;z-index: -2;right: -200px;visibility: hidden"
                 data-toggle="modal" data-target="#myModal6">打开回复的model
            </div>
        </div>
    </div>
</div>

<script>
function del(select){

    var group = $('#'+select);
    group.html('').hide();
}
</script>